<template>
  <!-- 芯片编码 -->
  <div>
    <el-dialog
      v-el-drag-dialog
      title="钢瓶信息"
      :visible.sync="visible"
      width="700px"
    >
      <div>
        <el-descriptions class="margin-top" title="钢瓶档案" size="medium" :column="2" border>
          <el-descriptions-item label="钢瓶编码">
            6655488
          </el-descriptions-item>
          <el-descriptions-item label="芯片编码">
            {{ temp.chipCode }}
          </el-descriptions-item>
          <el-descriptions-item label="出厂日期">
            2019-07-02
          </el-descriptions-item>
          <el-descriptions-item label="建档日期">
            2019-07-02
          </el-descriptions-item>
          <el-descriptions-item :span="2" label="下次检验">
            2023-07-02
          </el-descriptions-item>
          <el-descriptions-item label="镂空码">
            -
          </el-descriptions-item>
          <el-descriptions-item label="超高频芯片编码">
            E203A8AA
          </el-descriptions-item>
          <el-descriptions-item label="充装次数">
            5
          </el-descriptions-item>
          <el-descriptions-item label="规格型号">
            YSP-12
          </el-descriptions-item>
        </el-descriptions>

        <div class="last">最近三次充装记录</div>
        <lb-table
          ref="lbTable"
          class="table"
          border
          highlight-current-row
          element-loading-text="加载中"
          :column="tableData.column"
          :data="tableData.data.rows"
          :total="tableData.total"
          custom-column
          align="center"
        />
      </div>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    name: 'coding',
    data() {
      return {
        visible: false,
        temp: {},
        tableData: {
          total: 0,
          column: [
            {
              type: 'index',
              width: 30
            },
            {
              prop: 'czTime',
              label: '充装站'
            },
            {
              prop: 'czSleepingDays',
              label: '充装工位'
            },
            {
              prop: 'czOrgName',
              label: '充装时间'
            },
            {
              prop: 'modifyTime',
              label: '充装耗时(秒)'
            },
            {
              prop: 'sleepingDays',
              label: '充装净重'
            }
          ],
          data: {
            rows: []
          }
        }
      }
    },
    methods: {
      open(temp) {
        this.temp = temp
        console.log(temp)
        return new Promise((resolve) => {
          this.resolve = resolve
          this.visible = true
        })
      }
    }
  }
</script>

<style lang='scss' scoped>
.last {
  margin: 20px 0;
  font-size: 16px;
  font-weight: 700;
  color: #303133;
}
</style>
